API Documentation
Static Public Member Functions | List of all members
nkAstraeus::lua::nkTasksWrap::ThreadWrapper Class Referencefinal

Wraps a nkAstraeus::lua::nkTasksWrap::LuaThread and offers functions for use in scripting. More...

Static Public Member Functions

static void updateEnvironment (nkScripts::Environment *env)
 
static void * constructor (const nkScripts::DataStack &stack)
 
static void destructor (void *toDestroy)
 
static nkScripts::OutputValue addTask (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue releaseTaskRef (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue run (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue askAbort (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue join (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue askAbortAndJoin (const nkScripts::DataStack &stack)
 
static nkScripts::OutputValue runScript (const nkScripts::DataStack &stack)
 

Detailed Description

Wraps a nkAstraeus::lua::nkTasksWrap::LuaThread and offers functions for use in scripting.

Member Function Documentation

◆ updateEnvironment()

static void nkAstraeus::lua::nkTasksWrap::ThreadWrapper::updateEnvironment ( nkScripts::Environment env)
static

Updates a given environment and set it up to use all functions wrapped by this wrapper.

Parameters
envThe environment to set up.

◆ constructor()

static void* nkAstraeus::lua::nkTasksWrap::ThreadWrapper::constructor ( const nkScripts::DataStack stack)
static

Wrapper function for the constructor of the user type.

local t = nkTasks.Thread.new() ;
Parameters
stackThe parameter stack.
Returns
An output value with the user type and data allocated.

◆ destructor()

static void nkAstraeus::lua::nkTasksWrap::ThreadWrapper::destructor ( void *  toDestroy)
static

Wrapper function for the destructor of the user type.

Parameters
toDestroyThe data that has to be freed.

◆ addTask()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::addTask ( const nkScripts::DataStack stack)
static

Wrapper function for the nkTasks::Thread::addTask().

local s = t:addTask(d) ;
Parameters
stackThe parameter stack.
Returns
The attribute value, as a nkTasks::ThreadSubmittedWork.

◆ releaseTaskRef()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::releaseTaskRef ( const nkScripts::DataStack stack)
static

Wrapper function for the nkAstraeus::lua::LuaThread::releaseTaskRef().

t:releaseTaskRef(d) ;
Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

◆ run()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::run ( const nkScripts::DataStack stack)
static

Wrapper function for the nkTasks::Task::run().

t:run() ;
Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

◆ askAbort()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::askAbort ( const nkScripts::DataStack stack)
static

Wrapper function for the nkTasks::Task::askAbort().

Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

◆ join()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::join ( const nkScripts::DataStack stack)
static

Wrapper function for the nkTasks::Task::join().

t:join() ;
Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

◆ askAbortAndJoin()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::askAbortAndJoin ( const nkScripts::DataStack stack)
static

Wrapper function for the nkTasks::Task::askAbortAndJoin().

Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

◆ runScript()

static nkScripts::OutputValue nkAstraeus::lua::nkTasksWrap::ThreadWrapper::runScript ( const nkScripts::DataStack stack)
static

Wrapper function for the nkAstraeus::lua::LuaThread::runScript().

t:runScript("name") ;
Parameters
stackThe parameter stack.
Returns
The attribute value, empty.

The documentation for this class was generated from the following file: